package com.modelscope.ai.mapper;

import com.modelscope.ai.domain.entity.Exam;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.modelscope.ai.domain.vo.ExamVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author Administrator
 * @description 针对表【exam】的数据库操作Mapper
 * @createDate 2024-03-17 21:46:13
 * @Entity com.modelscope.ai.domain.entity.Exam
 */
@Mapper
public interface ExamMapper extends BaseMapper<Exam> {

    @Select("SELECT e.*,a.title,a.content,a.url,a.total FROM exam e left JOIN article a on e.article_id= a.id and a.is_delete=0 where uid=#{uid} and e.is_delete=0")
    List<ExamVo> query(@Param("uid") Long uid);

}




